<template>
	<view>
		<!-- 背景圖 -->
		<image class="backImage" src="https://app.yycjkb.cn/index/fujiajia/backImage.png" mode="widthFix"></image>
		<view class="container">
			<!-- 頁面頂部 -->
			<view class="top-section">
				<!-- 城市選擇 -->
				<view class="top-title">
					<view class="city-selector" @click="onSelectCity">
						<view class="page-title">
							{{cityname}}
						</view>
						<image class="arrow-icon" src="/static/user/location.png"></image>
						<text class="city-name">{{cityname}}</text>
						<image class="arrow-icon1" src="/static/user/arrow_down.png"></image>
					</view>
				</view>

				<!-- 搜索框 -->
				<view class="search-index">
					<view class="search-center">
						<image class="search-icon" src="https://app.yycjkb.cn/index/fujiajia/search.png" mode="">
						</image>
						<input type="text" model="searchtext" @tap="goSearch()" class="search-input"
							placeholder="搜索商家" />
						<view class="search-btn">
							搜索
						</view>
					</view>
				</view>
			</view>

			<!-- tab選擇 -->
			<view class="tab-content">
				<view v-for="(tab, index) in cateory" :key="index" class="tab-item"
					:class="{ 'active-tab': selectedTab === index }" @click="selectTab(index)">
					{{ tab.title }}
				</view>
			</view>

			<!-- grid分類 -->
			<view class="grid-container">
				<view class="grid-item" @tap="goMenu(item.id)" v-for="item in cateory[selectedTab].child">
					<image :src="item.thumb" mode="aspectFill"></image>
					<view class="grid-text">
						{{item.title}}
					</view>
				</view>
			</view>

			<!-- 本地生活 -->
			<view class="life-container">
				<view class="life-header">
					<view class="life-title titleCommon">
						<view class="title-name">
							本地生活
						</view>
						<view class="splite"> | </view>
						<view class="title-data">
							最高可省<text>100%</text>
						</view>
					</view>
					<view class="order-user">
						<!-- <text>u3080219</text>剛剛下單了 -->
						<!-- 滚动容器 -->
						<view class="scroll-box">
							<view class="scroll-container">
								<view class="scroll-wrapper">
									<!-- 原始内容 -->
									<view class="scroll-item" v-for="(item, index) in textList"
										:key="'original-' + index">
										{{ item }}
									</view>
									<!-- 复制内容，用于无缝滚动 -->
									<view class="scroll-item" v-for="(item, index) in textList" :key="'copy-' + index">
										{{ item }}
									</view>
								</view>
							</view>
						</view>
					</view>
				</view>

				<view class="life-grid">
					<view class="life-grid-item" v-if="index<4" v-for="(item,index) in taokeList">
						<image class="grid-item-back-image" src="http://139.159.229.212:8889/index/fujiajia/矩形.png" mode=""></image>
						<view class="item-left">
							<view class="flex">
								<image class="left-icon" src="/static/vip.png" mode=""></image>
								<view class="left-title">{{item.title}}</view>
							</view>
							<view class="left-data-money">
								最高省100%
							</view>
						</view>
						<view class="item-right">
							<image :src="item.thumb" mode=""></image>
						</view>
					</view>
				</view>

				<view class="life-radio">
					<view class="radio-item"v-if="index>4 && index<9" v-for="(item,index) in taokeList">
						<view class="radio">
							<image :src="item.thumb" mode=""></image>
						</view>
						<view class="radio-text">
							{{item.title}}
						</view>
					</view>
				</view>
			</view>

			<!-- 附近商家 -->
			<view class="nearby-businesses">
				<view class="businesses-title titleCommon">
					<view class="title-name">
						附近商家
					</view>
					<view class="splite"> | </view>
					<view class="title-data">
						最高可省<text>100%</text>
					</view>
				</view>

				<view class="businesses-item" v-for="(store, index) in shops">
					<image class="item-left-image" :src="store.logo" mode="" @tap="toShop(store.id)"></image>
					<view class="item-center-text" @tap="toShop(store.id)">
						<view class="">
							<view class="item-title">
								{{ store.short_name }}
							</view>
							<view class="item-phone">
								<image src="https://app.yycjkb.cn/index/fujiajia/phone.png" mode=""></image>
								{{ store.tel }}
							</view>
						</view>
						<view class="item-buy">
							<view class="money-box">
								<image src="https://app.yycjkb.cn/index/fujiajia/discount.png" mode=""></image>
							</view>
							<view class="money-data">
								讓利{{store.discount}}%
							</view>
						</view>
					</view>
					<view class="item-right-icon">
						<image class="icon-red" src="https://app.yycjkb.cn/index/fujiajia/red.png" mode="aspectFill">
						</image>
						<view class="address">
							<image class="icon-address" src="https://app.yycjkb.cn/index/fujiajia/定位.png"
								mode="aspectFill">
							</image>
							{{store.distance}}
						</view>
					</view>
				</view>
			</view>
		</view>
		<template v-if="userInfo.id>0 && money>0">
			<gcm-red-bag :money="money" :options="redBagConfig" @onConfirm="onConfirm" @onClose="onClose"
				@onCover="onCover"></gcm-red-bag>
		</template>
		<tabBar></tabBar>
	</view>
</template>

<script>
	import tabBar from "../components/tabBar/index.vue"
	export default {
		components: {
			tabBar
		},
		data() {
			return {
				pageTitle: "付加加",
				cityname: '厦门',
				selectedTab: 0, // 初始选中的tab索引
				tabTitles: ['热门', '休闲', '美食', '购物', '充值'],
				gridList: [{
						name: '美食',
						icon: "https://app.yycjkb.cn/index/fujiajia/编组 7.png"
					},
					{
						name: '饮品',
						icon: "https://app.yycjkb.cn/index/fujiajia/编组 6.png"
					},
					{
						name: '休闲/娱乐',
						icon: "https://app.yycjkb.cn/index/fujiajia/编组 21.png"
					},
					{
						name: '电影',
						icon: "https://app.yycjkb.cn/index/fujiajia/编组 4.png"
					},
					{
						name: '全部',
						icon: "https://app.yycjkb.cn/index/fujiajia/编组 3.png"
					},
				],
				lifeList: [{
					leftIcon: "https://app.yycjkb.cn/index/fujiajia/",
					leftTitle: "拼多多",
					leftInfo: "最高省50%",
					rightImage: "https://app.yycjkb.cn/index/fujiajia/位图.png",
					backImage: "https://app.yycjkb.cn/index/fujiajia/矩形.png"
				}, {
					leftIcon: "https://app.yycjkb.cn/index/fujiajia/",
					leftTitle: "美团",
					leftInfo: "最高省50%",
					rightImage: "https://app.yycjkb.cn/index/fujiajia/位图1.png",
					backImage: "https://app.yycjkb.cn/index/fujiajia/矩形备份 6.png"
				}, {
					leftIcon: "https://app.yycjkb.cn/index/fujiajia/",
					leftTitle: "京东",
					leftInfo: "最高省50%",
					rightImage: "https://app.yycjkb.cn/index/fujiajia/位图2.png",
					backImage: "https://app.yycjkb.cn/index/fujiajia/矩形备份 7.png"
				}, {
					leftIcon: "https://app.yycjkb.cn/index/fujiajia/",
					leftTitle: "饿了么",
					leftInfo: "最高省50%",
					rightImage: "https://app.yycjkb.cn/index/fujiajia/位图4.png",
					backImage: "https://app.yycjkb.cn/index/fujiajia/矩形备份 8.png"
				}, ],
				lifePlatformList: [{
						image: "https://app.yycjkb.cn/index/fujiajia/编组 25.png",
						title: "抖音"
					},
					{
						image: "https://app.yycjkb.cn/index/fujiajia/编组 14.png",
						title: "话费"
					},
					{
						image: "https://app.yycjkb.cn/index/fujiajia/编组 9.png",
						title: "唯品会"
					},
					{
						image: "https://app.yycjkb.cn/index/fujiajia/编组 5.png",
						title: "快递"
					},
				]
			};
		},
		methods: {
			onSelectCity() {
				uni.navigateTo({
					url: '/pages/citySelect/citySelect'
				});
			},
			selectTab(index) {
				this.selectedTab = index;
			}
		}
	}
</script>
<script>
	import {
		mapState,
		mapMutations
	} from 'vuex';
	import api from "@/api/";
	import user from "@/api/user";
	import uniLoadMore from "@/components/uni-load-more/uni-load-more.vue"
	import MyHomeHeader from "@/components/MyHomeHeader";
	import MyHomeSlide from "@/components/MyHomeSlide";
	import MyHomeMenus from "@/components/MyHomeMenus";
	import MyTaokeMenus from "@/components/MyTaokeMenus";
	import MyShops from "@/components/MyShops";
	// import TaokeList from "@/components/TaokeList";
	import {
		Base64
	} from "@/common/base64.js"
	export default {
		data() {
			return {
				money: 0,
				redBagConfig: {
					btnText: "确认收款",
				},
				// Tab 数据
				tabs: [{
						name: "全部"
					},
					{
						name: "饮品"
					},
					{
						name: "休闲娱乐"
					},
					{
						name: "电影"
					},
					{
						name: "购物"
					},
				],

				// 当前选中的 Tab 下标
				selectedTab: 0,

				// 每个 Tab 对应的内容
				tabContent: [
					// Tab 1 内容
					[{
							image: "/static/icons/food1.png",
							text: "火锅"
						},
						{
							image: "/static/icons/food2.png",
							text: "烧烤"
						},
						{
							image: "/static/icons/food3.png",
							text: "中餐"
						},
						{
							image: "/static/icons/food4.png",
							text: "日料"
						},
						{
							image: "/static/icons/food5.png",
							text: "甜品"
						},
					],
					// Tab 2 内容
					[{
							image: "/static/icons/drink1.png",
							text: "奶茶"
						},
						{
							image: "/static/icons/drink2.png",
							text: "咖啡"
						},
						{
							image: "/static/icons/drink3.png",
							text: "果汁"
						},
						{
							image: "/static/icons/drink4.png",
							text: "气泡水"
						},
						{
							image: "/static/icons/drink5.png",
							text: "酒类"
						},
					],
					// Tab 3 内容
					[{
							image: "/static/icons/relax1.png",
							text: "KTV"
						},
						{
							image: "/static/icons/relax2.png",
							text: "密室"
						},
						{
							image: "/static/icons/relax3.png",
							text: "桌游"
						},
						{
							image: "/static/icons/relax4.png",
							text: "SPA"
						},
						{
							image: "/static/icons/relax5.png",
							text: "健身"
						},
					],
					// Tab 4 内容
					[{
							image: "/static/icons/movie1.png",
							text: "动作片"
						},
						{
							image: "/static/icons/movie2.png",
							text: "喜剧片"
						},
						{
							image: "/static/icons/movie3.png",
							text: "科幻片"
						},
						{
							image: "/static/icons/movie4.png",
							text: "爱情片"
						},
						{
							image: "/static/icons/movie5.png",
							text: "悬疑片"
						},
					],
					// Tab 5 内容
					[{
							image: "/static/icons/shopping1.png",
							text: "服饰"
						},
						{
							image: "/static/icons/shopping2.png",
							text: "数码"
						},
						{
							image: "/static/icons/shopping3.png",
							text: "家电"
						},
						{
							image: "/static/icons/shopping4.png",
							text: "家具"
						},
						{
							image: "/static/icons/shopping5.png",
							text: "百货"
						},
					],
				],

				// 左侧列数据
				leftCards: [{
						title: '美团',
						subtitle: '最高领66元',
						image: '/static/icons/pin.png'
					},
					{
						title: '饿了么',
						subtitle: '最高领66元',
						image: '/static/icons/pin.png'
					},
				],

				// 中间列数据
				middleCards: [{
						title: '京东',
						subtitle: '最高省50%',
						image: '/static/icons/pin.png'
					},
					{
						title: '拼多多',
						subtitle: '最高省50%',
						image: '/static/icons/pin.png'
					},
				],

				// 右侧列新增的数据
				rightCards: [{
						title: '加油优惠',
						subtitle: '直降2.7元/升',
						image: '/static/icons/tab-1.png'
					},
					{
						title: '电影特惠',
						subtitle: '低至6折',
						image: '/static/icons/tab-2.png'
					},
					{
						title: '出行优惠',
						subtitle: '打车立减10元',
						image: '/static/icons/tab-3.png'
					},
					{
						title: '快递省钱',
						subtitle: '低至5元寄件',
						image: '/static/icons/tab-4.png'
					},
				],
				// 商家列表
				shops: [{
						image: '/static/images/shop1.jpg',
						name: '福帅食品经营部',
						distance: 0.7,
						discount: 11,
					},
					{
						image: '/static/images/shop2.jpg',
						name: '华南超市',
						distance: 1.2,
						discount: 15,
					},
				],
				textList: [], // 要滚动的文字
				money: 0,
				redBagConfig: {
					btnText: "确认收款",
				},
				taokeList: new Array(10).fill({}),
				slides: [{
					thumb: '../../../static/default.png'
				}],
				cateory: new Array(10).fill({}),
				sortType: 0,
				shops: [],
				page: 1,
				more: 'more',
				flag: false,
				locationRes: {
					longitude: 0,
					latitude: 0,
				},
				navList: [],
				goodsList: [],
				searchText: '',
				cityname: '厦门市'
			};
		},
		computed: {
			...mapState(['userLocation', 'userInfo', 'hasLogin']),
		},
		components: {
			MyHomeHeader,
			MyHomeSlide,
			MyHomeMenus,
			MyTaokeMenus,
			MyShops,
			uniLoadMore,
			// TaokeList
		},
		onUnload() {
			// 页面卸载时移除事件监听
			uni.$off('citynameChanged');
		},
		onShow() {
			let that = this
			// this.cityname = uni.getStorageSync('cityname')
			// alert(this.cityname);
			// 监听全局事件

			uni.$on('citynameChanged', (newCityname) => {
				this.shops = [];
				this.cityname = newCityname;
				// alert('城市名称已更新：' + this.cityname);
				this.getShops();
			});

			// uni.showModal({
			// 	title: '紧急声明',
			// 	content: "尊敬的付加加用户：\n由于附加加近期发展太快,导致被同行恶意投诉。公司法务部在做紧急申诉处理。\n敬请大家放心,付加加业务合情合法合理。公司现启动APP预案,一切业务正常有序进行。\n申诉流程完成后,会第一时间告知广大用户。\n付加加运营中心\n2025年3月15日 "
			// });
		},
		onLoad(params) {


			this.page = 1;

			if (params.cid) {
				this.$store.commit('setInviteCode', params.cid);
			}
			// console.log(this.$store.state.inviteCode);
			this.loadIndex();
			this.getCateory();
			this.getTaoke();
			this.getOrders();
			this.getShops();
			this.loadNav();
			this.getDistribute()
		},
		onReachBottom() {
			if (this.more !== 'noMore') {
				this.more = 'loading'
				this.page++;
				this.getShops();
			}
		},
		onPageScroll(e) {
			if (e.scrollTop > 600) { //当距离大于600时显示回到顶部按钮
				this.flag = true
			} else { //当距离小于600时隐藏回到顶部按钮
				this.flag = false
			}
		},
		methods: {
			onSelectCity() {
				uni.navigateTo({
					url: '/pages/gjs-selectCity/gjs-selectCity'
				})
			},
			toscan() {
				uni.navigateTo({
					url: '/pages/home/scan/scan'
				})
			},
			// 点击确认红包按钮事件
			onConfirm() {},
			// 关闭红包时触发
			onClose() {},
			// 开启红包时触发
			onCover() {
				if (!this.userInfo.id) {
					uni.navigateTo({
						url: '/pages/my/login'
					})
					return;
				}
				// api/user_Vip/distribute

			},
			goSearch() {
				uni.navigateTo({
					url: `/pages/home/search?keyword=` + this.searchText.trim()
				})
			},
			selectTab(index) {
				this.selectedTab = index;
			},
			goMenu(cid) {
				uni.navigateTo({
					url: `/pages/home/list?cid=${cid}`
				})
			},
			goNav(url) {
				// #ifdef H5
				location.href = url
				// #endif

				// #ifdef APP-PLUS

				plus.runtime.openUrl(url)

				// #endif

				// uni.navigateTo({
				// 	url: `/pages/home/list?cid=${cid}`
				// })
			},
			async goMap(shops) {
				if (!shops.lat || !shops.lng) {
					return this.toast('商家暂未设置导航');
				}
				const [err, res] = await uni.openLocation({ //​使用微信内置地图查看位置。
					latitude: parseFloat(shops.lat), //要去的纬度-地址
					longitude: parseFloat(shops.lng), //要去的经度-地址
					name: shops.short_name || shops.title,
					address: shops.address
				})
				if (err) {
					this.toast(err.errMsg)
				}
			},
			toShop(id) {
				uni.navigateTo({
					url: '/pages/home/detail?id=' + id
				})
			},
			// 点击确认红包按钮事件
			onConfirm() {},
			// 关闭红包时触发
			onClose() {},
			// 开启红包时触发
			onCover() {
				if (!this.userInfo.id) {
					uni.navigateTo({
						url: '/pages/my/login'
					})
					return;
				}
				// api/user_Vip/distribute

			},
			getDistribute() {
				let that = this

				user.distribute({
					user_id: that.userInfo.id
				}).then(res => {
					console.log(res.code)
					if (res.code === 1) {
						that.money = res.data.amount;
					} else {
						// that.toast(res.msg);
					}
				})
			},
			onSkip(id) {

				// #ifdef APP-PLUS
				plus.runtime.openURL('https://www.yycjkb.cn/dist/#/pages/product/goods?id=' + id)
				// #endif

				// #ifdef H5
				location.href = 'https://www.yycjkb.cn/dist/#/pages/product/goods?id=' + id
				// #endif


				// 
			},
			tonav(index) {

				let nav = '';
				if (index == 1) {
					nav = this.navList.nav1;
				}

				if (index == 2) {
					nav = this.navList.nav2;
				}

				if (index == 3) {
					nav = this.navList.nav3;
				}

				if (index == 4) {
					nav = this.navList.nav4;
				}

				uni.navigateTo({
					url: '/pages/web/index?url=' + Base64.encode(nav)
				})
			},
			async loadNav() {
				api.navList().then(res => {
					if (res.code === 1) {
						this.navList = res.data.navlist;
					} else {
						this.toast(res.msg);
					}
				});
				// https://www.yycjkb.cn/api/wanlshop/product/likes?page=1
				api.likes().then(res => {
					if (res.code === 1) {
						this.goodsList = res.data.data;
					} else {
						this.toast(res.msg);
					}
				})
			},
			async loadIndex() {
				api.index().then(res => {
					if (res.code === 1) {
						this.slides = res.data.list;
					} else {
						this.toast(res.msg);
					}
				});
			},
			async getCateory() {
				let res = await api.homecateList()
				if (res.code == 1) {
					this.cateory = res.data.list
				}
			},
			async getTaoke() {
				let res = await api.taokeList()
				if (res.code == 1) {
					this.taokeList = res.data.list
				}
			},
			async getOrders() {
				let res = await api.orderList()
				if (res.code == 1) {
					this.textList = res.data.list.map(item => item.txt);
				}
			},
			async getShops(type) {
				var that = this;
				// await this.$store.dispatch('getLocation');
				await uni.getLocation({
					success(result) {
						that.locationRes.latitude = result.latitude // 将纬度存起来
						that.locationRes.longitude = result.longitude // 将经度存起来

						api.shopList({
							cityname: that.cityname,
							recommend: 1,
							page: that.page,
							sortType: that.sortType,
							lng: that.locationRes.longitude,
							lat: that.locationRes.latitude
						}).then(res => {
							if (res.code == 1) {
								if (res.data.list.length <= 0) {
									that.more = 'noMore';
								} else {
									that.more = 'more';
								}
								that.shops = type ? res.data.list : that.shops.concat(res.data.list)
							}
						})

					},
					fail: error => {
						console.log("获取定位失败了", error)
						api.shopList({
							page: that.page,
							sortType: that.sortType,
							lng: 0,
							lat: 0
						}).then(res => {
							if (res.code == 1) {
								if (res.data.list.length <= 0) {
									that.more = 'noMore';
								} else {
									that.more = 'more';
								}
								that.shops = type ? res.data.list : that.shops.concat(res.data
									.list)
							}
						})
					}
				})


			},
			backTop() {
				uni.pageScrollTo({
					scrollTop: 0,
					duration: 200
				});
			},
			switchTab(sortType) {
				this.sortType = sortType;
				this.page = 1;
				this.getShops('change');
			}
		}
	};
</script>
<style lang="less" scoped>
	.scroll-box {
		flex: 1;
		/* 滚动框占据剩余空间 */
		overflow: hidden;
		/* 隐藏超出内容 */
		position: relative;
		background-color: rgba(141, 142, 144, 0.8);
		/* 背景颜色 */
		border-radius: 15px;
		/* 圆角 */
		color: white;
		/* 滚动文字颜色 */
		height: 30px;
		/* 滚动框高度 */
	}

	.scroll-container {
		position: relative;
		width: 100%;
		overflow: hidden;
		/* 隐藏超出部分 */
		height: 100%;
		/* 高度与滚动框一致 */
	}

	.scroll-wrapper {
		display: flex;
		flex-direction: column;
		/* 子项垂直排列 */
		animation: scroll-up 15s linear infinite;
		/* 无缝滚动动画 */
	}

	.scroll-item {
		padding: 10px;
		/* 滚动项的内边距 */
		font-size: 14px;
		text-align: center;
		/* 文字居中 */
		white-space: nowrap;
		/* 禁止换行 */
	}

	/* 向上滚动动画 */
	@keyframes scroll-up {
		0% {
			transform: translateY(0);
			/* 从初始位置开始 */
		}

		100% {
			transform: translateY(-100%);
			/* 滚动一整组内容 */
		}
	}


	.backImage {
		width: 100%;
		position: absolute;
		left: 0%;
	}

	.titleCommon {
		display: flex;
		align-items: center;
		padding: 0 10rpx;

		.splite {
			padding: 0 10rpx;
			color: #c8c8c8;
		}

		.title-data {
			color: #7b7b7b;

			text {
				color: rgb(237, 41, 30);
			}
		}
	}

	.container {
		padding-bottom: 178rpx;
		width: 690rpx;
		margin: auto;
		position: relative;

		.top-section {
			.top-title {
				padding-top: 40rpx;
				display: flex;
				align-items: center;
				justify-content: start;
				width: 100%;
				position: relative;

				.city-selector {
					display: flex;
					align-items: center;
					justify-content: flex-start;
					cursor: pointer;

					.arrow-icon {
						width: 32rpx;
						height: 32rpx;
						margin: 0 10rpx;
						filter: invert(100%) sepia(100%) saturate(0%) hue-rotate(0deg) brightness(101%) contrast(101%);
					}

					.arrow-icon1 {
						width: 26rpx;
						height: 16rpx;
						margin: 0 10rpx;
						vertical-align: middle;
						margin-top: 10rpx;
						filter: invert(100%) sepia(100%) saturate(0%) hue-rotate(0deg) brightness(101%) contrast(101%);
					}

					.city-name {
						font-size: 32rpx;
						color: #000;
					}

					.page-title {
						font-size: 40rpx;
						padding-right: 10rpx;
					}
				}
			}

			.search-index {
				background-color: #fff;
				height: 72rpx;
				width: 100%;
				border-radius: 100rpx;

				.search-center {
					margin: 25rpx;
					position: relative;
					display: flex;
					align-items: center;
					height: 100%;

					.search-icon {
						width: 47rpx;
						height: 47rpx;
					}

					.search-input {
						padding-left: 10rpx;
						font-size: 28rpx;
						width: 70%;
					}

					.search-btn {
						background-color: rgb(250, 158, 73);
						color: #fff;
						padding: 12rpx 36rpx;
						border-radius: 40rpx;
						font-size: 26rpx;
						margin-left: auto;
						position: absolute;
						right: -2%;
					}
				}
			}
		}

		.tab-content {
			display: flex;
			justify-content: space-between;
			padding: 0 10rpx;
			padding-top: 20rpx;

			.tab-item {
				font-size: 30rpx;
				position: relative;
				cursor: pointer;

				&::after {
					content: '';
					position: absolute;
					bottom: -5rpx;
					left: 0;
					width: 100%;
					height: 2rpx;
					background-color: #000;
					transform: scaleX(0);
					transform-origin: center;
					transition: transform 0.3s ease;
				}
			}

			.active-tab {
				font-weight: bold;

				&::after {
					bottom: -16rpx;
					height: 8rpx;
					border-radius: 10rpx;
					transform: scaleX(1);
				}
			}
		}

		.grid-container {
			margin: 40rpx 0;
			border-radius: 26rpx;
			width: 100%;
			height: 177rpx;
			background-color: #fff;
			box-shadow: rgba(0, 0, 0, 0.05) 0px 1px 2px 0px;
			display: flex;
			align-items: center;
			justify-content: space-around;

			.grid-item {
				width: 20%;
				display: flex;
				justify-content: center;
				align-items: center;
				flex-direction: column;
				position: relative;

				image {
					width: 56rpx;
					height: 56rpx;
				}

				.grid-text {
					// padding: 10rpx 0;
					margin-top: 14rpx;
					font-size: 22rpx;
				}
			}
		}

		.life-container {
			width: 100%;
			height: 734rpx;
			background-color: #fff;
			border-radius: 26rpx;
			box-shadow: rgba(0, 0, 0, 0.05) 0px 1px 2px 0px;
			padding: 20rpx;

			.life-header {
				display: flex;
				justify-content: space-between;
				align-items: center;

				.order-user {
					font-size: 20rpx;
					padding: 10rpx 25rpx;
					background-color: rgb(244, 242, 247);
					border-radius: 40rpx;
					color: #7b7b7b;
				}
			}

			.life-grid {
				display: flex;
				flex-wrap: wrap;
				justify-content: space-around;
				padding: 16rpx 0;

				.life-grid-item {
					margin: 7rpx;
					width: 313rpx;
					height: 177rpx;
					background-color: #fff;
					// box-shadow: rgba(0, 0, 0, 0.15) 1.95px 1.95px 2.6px;
					border-radius: 26rpx;
					display: flex;
					align-items: center;
					justify-content: center;
					position: relative;

					.grid-item-back-image {
						position: absolute;
						left: 0%;
						width: 100%;
						height: 100%;
					}

					.item-left {
						margin-right: 10rpx;
						z-index: 16;

						.left-icon {
							width: 44rpx;
							height: 44rpx;
							border-radius: 100%;
							margin-right: 10rpx;
						}

						.left-title {
							font-weight: bold;
						}

						.left-data-money {
							margin-top: 10rpx;
						}
					}

					.item-right {
						margin-left: 10rpx;

						image {
							width: 115rpx;
							height: 115rpx;
						}
					}
				}
			}

			.life-radio {
				display: flex;
				justify-content: space-around;
				align-items: center;
				padding: 20rpx 0;

				.radio-item {
					display: flex;
					justify-content: center;
					align-items: center;
					flex-direction: column;

					.radio {
						width: 132rpx;
						height: 132rpx;
						background-color: #fff;
						box-shadow: rgba(0, 0, 0, 0.05) 0px 0px 0px 1px;
						border-radius: 100%;
						display: flex;
						justify-content: center;
						align-items: center;

						image {
							width: 91rpx;
							height: 91rpx;
							border-radius: 100%;
						}
					}

					.radio-text {
						padding-top: 20rpx;
					}
				}
			}
		}

		.nearby-businesses {
			padding: 40rpx 0;

			.businesses-item {
				width: 100%;
				height: 204rpx;
				background-color: #fff;
				border-radius: 26rpx;
				margin-top: 20rpx;
				padding: 20rpx;
				display: flex;

				.item-left-image {
					width: 169rpx;
					height: 169rpx;
					border-radius: 26rpx;
				}

				.item-center-text {
					padding: 0 20rpx;
					display: flex;
					flex-direction: column;
					justify-content: space-between;

					.item-phone {
						display: flex;
						align-items: center;
						color: #7b7b7b;
						padding-top: 14rpx;

						image {
							width: 23rpx;
							height: 23rpx;
						}
					}

					.item-buy {
						display: flex;
						align-items: center;

						.money-box {
							width: 44rpx;
							height: 44rpx;
							background-color: #ff9b45;
							display: flex;
							justify-content: center;
							align-items: center;
							border-bottom-left-radius: 6rpx;
							border-top-left-radius: 6rpx;

							image {
								width: 29rpx;
								height: 29rpx;
							}
						}

						.money-data {
							height: 44rpx;
							width: 155rpx;
							text-align: center;
							border-bottom-right-radius: 6rpx;
							border-top-right-radius: 6rpx;
							color: #ff9b45;
							background-color: rgba(255, 155, 69, 0.2);
						}
					}
				}

				.item-right-icon {
					margin-left: auto;
					display: flex;
					flex-direction: column;
					justify-content: space-between;

					.icon-red {
						width: 40rpx;
						height: 90rpx;
						margin-left: auto;
						margin-top: -10rpx;
					}

					.address {
						display: flex;
						align-items: center;
						color: #8a8a8a;

						image {
							height: 44rpx;
							width: 44rpx;

						}
					}
				}
			}
		}
	}
</style>